using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace InvestmentIntelligence.DbModel.Models.Mapping
{
    public class BookBenchmarkTypeMap : EntityTypeConfiguration<BookBenchmarkType>
    {
        public BookBenchmarkTypeMap()
        {
            // Primary Key
            this.HasKey(t => t.FundBookEntityId);

            // Properties
            this.Property(t => t.FundBookEntityId)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.BenchmarkType)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("BookBenchmarkType", "TradingData");
            this.Property(t => t.FundBookEntityId).HasColumnName("FundBookEntityId");
            this.Property(t => t.BenchmarkType).HasColumnName("BenchmarkType");

            
        }
    }
}
